<template>
  <div ref="wrapper">
      <div class="content">
          <slot></slot>
      </div>
  </div>
</template>

<script>
// <script src = '../../../common/core.esm.js'></script>
import BScroll from 'better-scroll'

export default {
    name: 'Scroll',
    data() {
        return {
            // scroll: null
        }
    },
    props: {
        probeType: {
            type: Number,
            default: 0
        }
    },
    mounted() {
        // 不推荐通过querySelector来查询wrapper（查询到的第一个元素）
        // this.scroll = new BScroll(document.querySelector('wrapper'), {
        // })
        let scroll = new BScroll(this.$refs.wrapper,{
            scrollY: true,
            probeType: this.probType,
            // 使scroll里面的原生事件起效果
            click: true,
        })
    },
}    
</script>
<style>

</style>